﻿@model DotaHelp.Models.Topic

@{
    ViewBag.Meta_description = "Dotahelp - " + Model.Caption;
    ViewBag.Meta_keywords = Model.Caption +","+ Model.Author +","+ Model.Date;
    ViewBag.Title = Model.Caption;
}

<script type="text/javascript">
    $(function () {
        $("#ChangedTopic").bind("click", function () {
            var p = prompt("Введи пароль для доступа к гайду", "Пароль");
            if (p != "") {
                window.location = "/EditTopic/@Model.Id/" + p;
            }
        });
    });
    </script> 

<h2>@Model.Caption от @Html.ShowUserName(Model.Author) @Html.Raiting("Forum",  Model.Id, Model.Raiting) @Html.CreateUserButton(Model.Author, Model.Password) @Html.EditDialog("Topics", "Caption", Model.Id, Model.Caption)  <input type="button" value="Редактировать" id="ChangedTopic" /></h2>

<div>
    @Html.ReplaceKeyOnContent(Model.Text, true, true) @Html.EditDialog("Topics", "Text", Model.Id, Model.Text)
</div>

<h3>Комментарии:</h3>

@Html.Comments(Model.Caption, Url.RouteUrl("Topic", new { id = Model.Id }))



<script type="text/javascript">
    var MGCD = new Date();
    var min_width = '301';
    var min_height = '201';
    var overlay_interval = '40';
    var overlay_height = '55';
    var mg_opacity = '0.8';
    var mg_bgcolor = '#353535';

    document.write('<scr'
+ 'ipt type="text/javascript"'
+ ' src="http://jsc.dt00.net/d/o/dotahelp.ru.25766.js?t='
+ MGCD.getYear()
+ MGCD.getMonth()
+ MGCD.getDay()
+ MGCD.getHours()
+ '" charset="windows-1251"></scr' + 'ipt>');
</script>